<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
    <head>
        <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
        <title>LEAVE MESSAGE【留言】--&lt;<{$siteconfig.sitename}>&gt;</title>
        <link href="assets/css/style.css" rel="stylesheet" type="text/css" />
        <script type="text/javascript" src="assets/js/jquery.js"></script>
        <script type="text/javascript" src="assets/js/jquery.easing.1.3.js"></script>
        <link href="assets/css/featuredcontent.css" rel="stylesheet" type="text/css" />
        <script type="text/javascript" src="assets/js/jquery-ui.min.js" ></script>
        <script charset="utf-8" src="include/kindeditor/kindeditor-min.js"></script>
        <script charset="utf-8" src="include/kindeditor/lang/zh_CN.js"></script>
        <script type="text/javascript">
            $(document).ready(function(){

                $(".btn-slide").click(function(){
                    $("#panel").slideToggle("slow");
                    $(this).toggleClass("active"); return false;
                });	 
            });
        </script>

        <style type="text/css">
       
            a:focus {
                outline: none;
            }
            #panel {
                background: #212121;
                height: 400px;
                display: none;
            }
            .slide {
                margin: 0;
                padding: 0;
                border-top: solid 8px #909090;
                background: url(assets/images/btn-slide.png) no-repeat center top;
            }
            .btn-slide {
                background: url(assets/images/white-arrow.gif) no-repeat right -57px;
                text-align: center;
                width: 144px;
                height: 31px;
                padding: 0px 10px 0 0;
                margin: 0 auto;
                display: block;
                font: bold 120%/100% Arial, Helvetica, sans-serif;
                color: #fff;
                text-decoration: none;
            }
            .active {
                background-position: right 0px;
            }
        </style>
        <script>
            var editor;
            KindEditor.ready(function(K) {
                editor = K.create('textarea[name="content"]', {
                    resizeType : 1,
                    allowPreviewEmoticons : false,
                    allowImageUpload : false,
                    width : 440,
                    items : [
                        'fontname', 'fontsize', '|', 'forecolor', 'hilitecolor', 'bold', 'italic', 'underline',
                        'removeformat', '|', 'justifyleft', 'justifycenter', 'justifyright', 'insertorderedlist',
                        'insertunorderedlist', '|', 'emoticons', 'image']
                });
            });
            function CheckPost()
            {
                if (myform.name.value=="")
                {
                    alert("请填写昵称啊~~~亲！");
                    myform.name.focus();
                    return false;
                }
                if (editor.isEmpty())
                {
                    alert("请填写内容啊~~~亲！");
                    myform.content.focus();
                    return false;
                }
            }
        </script>
    </head>

    <body>
        <div id="wrapper">
            <{include file="default/head.html"}>
            <div id="content">
                <h1>Leave Message</h1>                
                <div id="contact">
                <div id="panel">
                    <hr size="8" color="#909090"/>
                    <p>请自觉遵守互联网相关的政策法规，严谨发布广告、色情、暴力、反动的言论，谢谢合作！</p>
                    <p>
                    <form  name="myform" method="post" action="<{spUrl c=contactus a=save_message}>" onsubmit="return CheckPost();">
                        <label>昵称：</label><input name="name" type="text" /><br/>
                        <label>内容：</label><textarea name="content" rows="5"></textarea><br/>
                        <label>验证码：</label>
                        <input style="background: url(checkpic.php) #FFF no-repeat; background-position: right;" name="passcode" type="text" />
                        <br />
                        <label></label>
                        <input type="submit" value="" name="submit" style="width:87px; height: 32px; padding-left: 0; padding-top: 0; border:0px; background: url(assets/images/send.gif) no-repeat;" />
                    </form>
                    </p>
                </div>
                <p class="slide"><a href="#" class="btn-slide">在此留言</a></p><br/> 
                
                <div><h4>Message List</h4></div>
                <hr size="8" color="#909090"/>
                <div>
                    <p style="line-height:20px;">
                        <{foreach from=$msinfo item=msrow}>
                        <span><b>※<{$msrow.id}>楼 <{$msrow.name}>：</b> | 发表于 <{$msrow.datetime}></span><br /><hr style="border: #909090 dashed 1px;"/>
                        <span><{$msrow.content}></span><br />
                        <{if $msrow.msreply}>
                        <hr/>
                        <span><b>#管理员回复：</b></span>
                            <span><{$msrow.msreply.mrcontent}></span></br>
			<{/if}>
                        <!--<span style="float:right"><a href="#">支持</a>(0)<a href="#"> 反对</a>(0) 回复</span><br/>-->
                        <hr size="4" color="#909090"/>
                        <{/foreach}>
                    </p>
                    
                    <p>
                        <{if $pager}>
                        共有留言<{$pager.total_count}>条，共有<{$pager.total_page}>页（每页<{$pager.page_size}>条留言）：
                        <!--在当前页不是第一页的时候，显示前页和上一页-->
                        <{if $pager.current_page != $pager.first_page}>
                        <a href="<{spUrl c=contactus a=show_message page=$pager.first_page}>">前页</a> | 
                        <a href="<{spUrl c=contactus a=show_message page=$pager.prev_page}>">上一页</a> | 
                        <{/if}>
                        <!--开始循环页码，同时如果循环到当前页则不显示链接-->
                        <{foreach from=$pager.all_pages item=thepage}>
                        <{if $thepage != $pager.current_page}>
                        <a href="<{spUrl c=contactus a=show_message page=$thepage}>"><{$thepage}></a>
                        <{else}>
                        <b><{$thepage}></b>
                        <{/if}>
                        <{/foreach}>
                        <!--在当前页不是最后一页的时候，显示下一页和后页-->
                        <{if $pager.current_page != $pager.last_page}>
                        | 
                        <a href="<{spUrl c=contactus a=show_message page=$pager.next_page}>">下一页</a> | 
                        <a href="<{spUrl c=contactus a=show_message page=$pager.last_page}>">后页</a>
                        <{/if}>
                        <{/if}>
                    </p>
                </div>
                </div>
            </div>        
        </div>
        <{include file="default/footer.html"}>
    </body>
</html>
